home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earcd / grafica / ghostscript / 5.10 / gs_typ42.ps < prev    next >
Text File  |  1997-12-28  |  2KB  |  46 lines

  1. %    Copyright (C) 1996 Aladdin Enterprises.  All rights reserved.
  2. % This file is part of Aladdin Ghostscript.
  3. % Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. % or distributor accepts any responsibility for the consequences of using it,
  5. % or for whether it serves any particular purpose or works at all, unless he
  6. % or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. % License (the "License") for full details.
  8. % Every copy of Aladdin Ghostscript must include a copy of the License,
  9. % normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. % the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. % under certain conditions described in the License.  Among other things, the
  12. % License requires that the copyright notice and this notice be preserved on
  13. % all copies.
  14.  
  15. % Type 42 font support code.
  16.  
  17. % Here are the BuildChar and BuildGlyph implementation for Type 42 fonts.
  18. % The names %Type42BuildChar and %Type42BuildGlyph are known to the
  19. % interpreter.  The real work is done in an operator:
  20. %    <font> <code|name> <name> <glyphindex> .type42execchar -
  21.  
  22. (%Type42BuildChar) cvn    % <font> <code> %Type42BuildChar -
  23.  { 1 index /Encoding get 1 index get .type42build
  24.  } bind def
  25. (%Type42BuildGlyph) cvn    % <font> <name> %Type42BuildGlyph -
  26.  { dup .type42build
  27.  } bind def
  28. /.type42build        % <font> <code|name> <name> .type42build -
  29.  { 2 index begin
  30.     dup CharStrings exch .knownget not
  31.      { 2 copy eq { exch pop /.notdef exch } if
  32.        QUIET not
  33.     { (Substituting .notdef for ) print = flush }
  34.     { pop }
  35.        ifelse
  36.        /.notdef CharStrings /.notdef get
  37.      } if
  38.    end .type42execchar
  39.  } bind def
  40.  
  41. % Register the font type for definefont.
  42. buildfontdict 42 /.buildfont42 cvx put
  43.